cc = sw5cc  -host 
cc_slave = sw5cc -slave 

#DAG_HOME=/home/export/base/nsccwuxi_ict/chenl/online3/
SCHEDULER_INSTALL_PATH=${DAG_HOME}/dag_task_scheduler

#DEBUG = -DCHECK #-g
OPT = -O3  #-std=gnu99

EXTRA_FLAGS += -DN=7682
EXTRA_FLAGS += -DTASK_BSIZE_1=10 -DTASK_BSIZE_2=40
EXTRA_FLAGS += -DBSX=10 -DBSY=40

#EXTRA_FLAGS+=-DATHREAD
EXTRA_FLAGS+=-DDAG


######test5#EXTRA_FLAGS= -DN=7682 -DBS=640 -DTASK_BSIZE_1=80 #-DMMEM
#EXTRA_FLAGS= -DN=7682 -DBS=960 -DTASK_BSIZE_1=80 #-DMMEM
#EXTRA_FLAGS+=-DINST_PERF 
#EXTRA_FLAGS+=-DDOUBLE_FUNC 

#EXTRA_FLAGS+= -DFAKE_KERNEL -DCYCLES=20000
#EXTRA_FLAGS+= -DREUSE_GRAPH -DDIST=1
LIBFLAGS =  -L${SCHEDULER_INSTALL_PATH}/lib -ldag_task_scheduler -lstdc++ -lm -lswperf

CFLAGS = $(DEBUG) $(OPT) $(EXTRA_FLAGS) -Wall -I${SCHEDULER_INSTALL_PATH}/include 
 
dag:gauss_dag_master.o gauss_dag_slave.o
	$(cc_slave) -hybrid   $(CFLAGS)  -o gauss_dag gauss_dag_master.o gauss_dag_slave.o $(LIBFLAGS)
gauss_dag_master.o: gauss_dag_master.c	
	$(cc) $(CFLAGS) -c  gauss_dag_master.c  $(LIBFLAGS)
gauss_dag_slave.o: gauss_dag_slave.c
	$(cc_slave) $(CFLAGS)  -c gauss_dag_slave.c  $(LIBFLAGS)


clean:
	@rm -f *.o  gauss_dag
	@echo Cleaning current directory 
clean_all:
	@rm -f *.o *.txt *.log tmp gauss_dag
	@echo Cleaning current directory
